<?php

abstract class Core_Model_DbTable_Product_Abstract extends YouNet_Db_Table
{
	protected $_referenceMap    = array(
        'Product' => array(
            'columns'           => 'id_product',
            'refTableClass'     => 'Core_Model_DbTable_Products',
            'refColumns'        => 'id'
        )
    );
	
	protected function _getParams(Core_Model_Product $product)
	{
		$params			= array(
			'id_product'		=> $product->id,
			'id_user'			=> @$socialPlugin->getIdUser(),
			'id_store'			=> $product->id_store,
			'id_page'			=> @$socialPlugin->getIdPage(),
			'ip_address'		=> isset($_SERVER['REMOTE_ADDR'])?$_SERVER['REMOTE_ADDR']:'',
		);
		return $params;
	}
	/**
	 * @param Core_Model_Product $product
	 * @return int 
	 */
	abstract public function insertProductInfo(Core_Model_Product $product);
}